
<div class="col-xs-12 col-md-12 col-lg-8">
    <div class="box">
		<div class="box-header with-border">
			<h3 class="box-title">{$new_row.title}</h3>
		</div>
		<div class="box-body">
            <span class="meta-site">
                <span class="date"><i class="fa fa-clock-o"></i> {:from_time($new_row['create_time'])}</span>
                <span>&nbsp;&nbsp;</span>
                <span class="cat"><i class="fa fa-columns"></i> {$row.name}</span>
                <span>&nbsp;&nbsp;</span>
                <span class="cat"><i class="fa fa-user"></i> {$new_row.author}</span>
                <span>&nbsp;&nbsp;</span>
                <?php $tag_data = get_news_tags($new_row['id']);?>
                <span class="cat"><i class="fa fa-tags"></i> 
                    <?php
                        if (!empty($tag_data)) {
                            foreach ($tag_data as $val) {
                                echo '<a href="'.Url('/tag/'.$val['tag_id']).'">'.$val['name'].'</a> &nbsp; ';
                            }
                        }
                    ?>
                </span>
            </span>
		</div>
		<!-- /.box-body -->
        {if condition="$new_row['editor_type'] eq 2"}
		<div class="box-footer bd_content" id="md_content">
            <textarea style="display:none;">{$new_row.content}</textarea>
		</div>
        {else /}
        <div class="box-footer bd_content">
            {$new_row.content|raw}
		</div>
        {/if}
		<!-- /.box-footer-->
        <div class="box-footer">
            {if ($new_row['is_original'] == 1)}
            <?php $reprint_url = 'http://'.$_SERVER['HTTP_HOST'].Url('/news/'.$new_row['id']); ?>
			<p>本文为原创文章，转载无需和我联系，但请注明来自：<a href="{$reprint_url}">{$reprint_url}</a></p>
            {/if}
            <p>上一篇：{if (!empty($up_row))}<a href="{:Url('/news/'.$up_row['id'])}">{$up_row.title}</a>{else /}<span>没有了</span>{/if}</p>
            <p>下一篇：{if (!empty($down_row))}<a href="{:Url('/news/'.$down_row['id'])}">{$down_row.title}</a>{else /}<span>没有了</span>{/if}</p>
		</div>
	</div>
</div>
{if condition="$new_row['editor_type'] eq 2"}
<link href="__JS__/editormd/css/editormd.preview.min.css?v=1.2" rel="stylesheet"/>
<script src="__JS__/editormd/lib/marked.min.js"></script>
<script src="__JS__/editormd/lib/prettify.min.js"></script>
<script src="__JS__/editormd/lib/raphael.min.js"></script>
<script src="__JS__/editormd/lib/underscore.min.js"></script>
<script src="__JS__/editormd/lib/sequence-diagram.min.js"></script>
<script src="__JS__/editormd/lib/flowchart.min.js"></script>
<script src="__JS__/editormd/lib/jquery.flowchart.min.js"></script>
<script src="__JS__/editormd/editormd.js"></script>

<script type="text/javascript">
$(function () {
    var EditormdView = editormd.markdownToHTML("md_content", {
        htmlDecode      : "style,script,iframe",  // you can filter tags decode
        emoji           : true,
        taskList        : true,
        tocm            : true,  // 使用 [TOCM]
        tex             : true,  // 默认不解析
        flowChart       : true,  // 默认不解析
        sequenceDiagram : true,  // 默认不解析
    });
});
</script>
{else /}
<script type="text/javascript">
// 实现代码高亮的函数。
hljs.initHighlightingOnLoad();
// 由于UEditor的代码中都是<pre>标签包裹的代码，所以执行下面的操作为其添加<code>标签。
var allpre = document.getElementsByTagName("pre");
for(i = 0; i < allpre.length; i++) {
    var onepre = document.getElementsByTagName("pre")[i];
    var mycode = document.getElementsByTagName("pre")[i].innerHTML;
    onepre.innerHTML = '<code id="pre_code">'+mycode+'</code>';
}
</script>
{/if}